package com.yilin.tms.core.entity.order.dispatch;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseNoteEntity;
import com.yilin.tms.core.commons.annotation.Explain;
import com.yilin.tms.core.entity.order.goods.GoodsOrderNote;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;


@Entity
@Table(name = "dispatch_order_note")
@TableName(value = "dispatch_order_note")
public class DispatchOrderNote extends BaseNoteEntity {

    @Explain("派单ID")
    @Column(name = "dispatch_order_id")
    private String dispatchOrderId;

    @Explain("节点货物量")
    @Column(name = "goods_note_measure")
    private Double goodsNoteMeasure;
    @Explain("节点货物量")
    @Column(name = "goods_note_transport_cost")
    private Double goodsNoteTransportCost;

    @Explain("计量单位")
    @Column(name = "measure_unit")
    private String measureUnit;

    /**
     * 货物LIST
     * */
    @Transient
    @TableField(exist = false)
    @Explain("货源货物List")
    private List<DispatchOrderNoteDetail> dispatchOrderNoteDetailList;

    public GoodsOrderNote transGoodsOrderNote() {
        GoodsOrderNote goodsOrderNote = new GoodsOrderNote();
        goodsOrderNote.setConsignorArea(getConsignorArea());
        goodsOrderNote.setConsignorName(getConsignorName());
        goodsOrderNote.setConsignorPhone(getConsignorPhone());
        goodsOrderNote.setConsignorCoordinate(getConsignorCoordinate());
        goodsOrderNote.setConsignorAddress(getConsignorAddress());
        goodsOrderNote.setConsignorAdCode(getConsignorAdCode());
        goodsOrderNote.setConsigneeArea(getConsigneeArea());
        goodsOrderNote.setConsigneeName(getConsigneeName());
        goodsOrderNote.setConsigneePhone(getConsigneePhone());
        goodsOrderNote.setConsigneeCoordinate(getConsigneeCoordinate());
        goodsOrderNote.setConsigneeAddress(getConsigneeAddress());
        goodsOrderNote.setConsigneeAdCode(getConsigneeAdCode());
        goodsOrderNote.setGoodsNoteMeasure(getGoodsNoteMeasure());
        goodsOrderNote.setGoodsNoteTransportCost(getGoodsNoteTransportCost());
        goodsOrderNote.setMeasureUnit(getMeasureUnit());
        return goodsOrderNote;
    }


    public String getDispatchOrderId() {
        return dispatchOrderId;
    }

    public void setDispatchOrderId(String dispatchOrderId) {
        this.dispatchOrderId = dispatchOrderId;
    }

    public List<DispatchOrderNoteDetail> getDispatchOrderNoteDetailList() {
        return dispatchOrderNoteDetailList;
    }

    public void setDispatchOrderNoteDetailList(List<DispatchOrderNoteDetail> dispatchOrderNoteDetailList) {
        this.dispatchOrderNoteDetailList = dispatchOrderNoteDetailList;
    }

    public String getMeasureUnit() {
        return measureUnit;
    }

    public void setMeasureUnit(String measureUnit) {
        this.measureUnit = measureUnit;
    }

    public Double getGoodsNoteMeasure() {
        return goodsNoteMeasure;
    }

    public void setGoodsNoteMeasure(Double goodsNoteMeasure) {
        this.goodsNoteMeasure = goodsNoteMeasure;
    }

    public Double getGoodsNoteTransportCost() {
        return goodsNoteTransportCost;
    }

    public void setGoodsNoteTransportCost(Double goodsNoteTransportCost) {
        this.goodsNoteTransportCost = goodsNoteTransportCost;
    }



}
